search: fix jrec handling

* Fixes incorect handling of 'jrec' attribute together with pagination.
  (closes #1756)

Reported-by: Samuele Kaplun <samuele.kaplun@cern.ch>
Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>