Hi motorsep,
I thought I had seen a Pull Request on GitHub related to this recently, but when I went looking for it today I wasn’t able to find it. I glanced over the fix proposed in the link you provided and I am not sure it would be a complete fix for all possible needs.
It does seem to solve the issue where you would need to replace a previous stat with the current stat if the current stat is larger. However, what if you wanted the stat to track the lowest value (fastest time through a level, for example), or wanted the stat to be cumulative as it is now (total time played, for example)? The proposed fix does not appear to take those options into consideration.