The updated comment explains why the new ordering is correct. Previously the scroll offset transform was being applied after the local reference frame transform, instead of before. A more detailed explanation of why the old code was incorrect and the new code is correct can be found at https://bugzilla.mozilla.org/show_bug.cgi?id=1415272#c23