Simplify unnecessarily complicated conditional.

if (a) if (a and (b or not b and c))
can be simplified as
if (a) if (b or c)