SERVER-13731 make depth limit in parsing work for deep trees other than AND and OR