If it helps further, some of my testers on iOS 11 are reporting that "switching keyboards solves the problem briefly, and then it reappears"
So would hazard a guess (my test device is still on iOS10) that the value is correct the first time after a keyboard change, rather than just the first time.