LPS-28820 Fix LayoutImpl to return theme setting from the theme of the page if lookandfeel is not inherited from LayoutSet

Hey Ray and Julio can you check that this fix is correct and doesn't break anything that I wasn't aware of. cc @juliocamarero