Extended PREFIX regex in PartTree to support the "query" prefix. Original author: @jiming Original pull request: #56.