fix bug 834384: Include demo search terms in pagination links when needed