Fixes #390 - IN/ANY/NONE/ANY/SINGLE causes RuntimeException for some patterns