Fix Coverity 1023886 (a true bug) and 1023883.