Fix bug introduced in 8646fb3

Many boolean operations did not behave as expected.