I don't think this line should be necessary.  It is probably a bug if keyboardName is not a member of enabledKeyboardNames. But even if it isn't the user should always be able to use the keyboard.current keyboard even if it is not a member of an enabled keyboard group.