Fix for bug when evaluate systems with a mixture of ORs and other gates