fix and within or

Ticket

+commit
 

 

 

 

I refactored the and/or handling and wrote a test for this.  I suspect there were several other broken "or" cases (at least theoretical ones) that this may have fixed.