common: Put scopeMatch in util, use in highlights