Merge pull request #1010 from AndrzejKurek/fix-error-translation

psa_util: fix for correctly computing elements in array