Fixed bug that would cause queries to generate wrongly. OR groups containing queries as restrictions (which are AND groups) would create random results.