LPS-44765 Apply distributive property to simplify if.