BUG-10123 Fix issues reported by Coverity