Made sure that wrapped child query / parent query gets rewritten only once.