Now the keyboard settings also save the reference loop count to compare to the current value (cherry picked from commit 91e0ee0c)