Fix #2295 by reading the $top variable from the Query String.

Fixes #2295