Update extend functionality and tests to apply to all selectors in a rule-based extend