Add sort-of missed returns to keep coverity happy (#4817).