closes #4912 I didn't merge the original PR because this needs to be checked for explicitly registered handlers as well as auto-detected ones from listeners.