Fixed an infinite loop in the QL parser.