Fix buglet in new set_tag() helper.
Fix numerous small errors in new routing code.
Update tests.