Revert "Fix for has_child can cause an infinite loop (100% CPU) when used in bool query."

Temporarily revert the commit while waiting for the CLA to be signed.