Check tree's queue length and remove global assertion. #1230