Fixes #7847

`KeyError`