this incorrect CHECK_MSG created a crash. Fixes #11859 https://gitlab.com/kicad/code/kicad/issues/11859