Fixed pagination in searches. Issue Tracker #31412.