As you have put such a lot of effort into analyzing the problem I think you have answered your own question in many ways.
The next step is to raise this as a bug in tracker.moodle.org with all your information.
As you have put such a lot of effort into analyzing the problem I think you have answered your own question in many ways.
The next step is to raise this as a bug in tracker.moodle.org with all your information.