Fixes Issue 9312 - With diagnostic is wrong.