BUG-10635 Fix more issues reported by Coverity