BPMSPL-84 - bugfix (REST rich queries)

(cherry picked from commit 166d8d1471eada7b36eac63641721e540030315d)