Mismatch between pdb and module is not detected

I use the current WinDbg 1.2601.12001.0. I debug a KMDF driver. Lately, the checks that should ensure that pdb and module match together don’t work. WinDbg happily lets me debug a module where I supplied the wrong pdb. When stepping through code the current line in the source file jumps unexpectedly. Module was built as debug config. WDK 10.0.26100.6584, Visual Studio 17.14.27.

!lmi modulname
Loaded Module Info: [modulname]
Cannot read Image header @ 0000000560000000

The command lm shows “private pdb symbols”.

Does anybody know how to get the checks to work?

What does !sym noisy ; .reload say about loading the PDB for your driver?