Changed behavior so that one of match or unmatch is always called when the handler is registered.