CFY-1352 improved router code; fixed a bug in use_external_resource validation for the subnet and port types