more robust handling of local gateway namespace lookups.