Propagate parameters into query predicates.

Muddled argument slicing was eliminating the arguments passed to query
predicates.
Merge branch `sub-queries` into `master`.