Replace checks for naming of portal exit nodes by calling a suitable function.