Fix Issue 12598 - Emit better diagnostics when type is found where an lvalue was expected.