fix(core): Make rule match order deterministic, later rules take priority
In various use cases we have seen rules that we believe should match but do not, or are superceded by rules that should have lower priority because they come earlier in the style. The root cause was the use of Array.reverse
which reverses the array in place. The net effect is that every attempt to apply the style sheet reversed the rule order. This now just iterates the list in reverse instead of using the reverse
method.