Properly encode nested query parameters into hidden fields. Refs #1738