Fixed an issue where group rules were not ANDed together correctly. Added test to ensure this behavior.