BPMSPL-84 - bugfix (REST rich queries)

(cherry picked from commit 4bdff5833cab08cee078a2b9d8a3a94db0703e13)