BPMSPL-84 - bugfix (REST rich queries)

(cherry picked from commit 11ae74eeb98f1bd207ebeaaa0aa75a87621c69fd)