More robust handling of invalid addresses in the routing table.

Fixes #8.