Fix ruleset bugs

From https://trac.torproject.org/projects/tor/ticket/10241