Seems like impossible disable caps lock then screenlock runs.:dodgy: I use Caps Lock like language selector, and in usual case it toggles by Shift+CapsLock but not for screenlock I can enable it but impossible disable.
Seems to be an upstream issue. Screenlock is a mess since the 4.10 upgrade and still very buggy.
I can find several screenlock issues related to language selection and screenlock but no one with your exact problem. Maybe it is worthwile reporting it there.
Are you send them the bug?
The best is when you who are currently suffering from this particular error could open the bug report as there might be questions from the developers that only you can answer.
As mainstream you are mean KDE team or Kubuntu team?