[#1001] Simplify boolean expression