Now this is an ugly workaround if I ever saw one!! :)

Couldn't you pass a parameter to this bundle "check_on_relay_server" that takes true or false, and do the test based on that? Seems so much cleaner to keep the logic in the caller, than inside this "generic" bundle...