Sphinx optimizations - Use sphinx optimizations also in case of nested
AND.