BPMSPL-84 - minor bugfixes for task/process instance query operations
(cherry picked from commit 860f791fe9d1c0ea073fb621b11ffce14a6081c0)