Utility function to wrap externally registered command handlers into the internal command handler and make sure the custom ones are used if defined