Merge "Tweak visibility logic for inflated view scenarios" into klp-dev