Fix regression in frame style scoping

I4db7190 fixed an issue with nested frames

Ic80169f was based on an ancient version of the code and effectively reverted it

Bug: 64761
Change-Id: I04e809bf31a11c1ac2a82be44ea1f716b950c208