Fixes Issue 9479 - Suppress mismatch of return type when return expression is an error.