Replaces the matching logic of Backbone.History from first match to best match.