Fixed an edge case when parsing Java query strings.