Moved link_reroute_permit behind find_subnets.

Otherwise automatic groups wouldn't work.