Describe the problem
Using the latest version of PkHex, when legit RNGed Pokemon from Generation 3/Colosseum are transferred to Gen 6, and then earn the Gen 6 contest ribbons, they are marked as illegal in Generation 7 after being Banked over. Mons native to Gen 6 that also earned the contest ribbons do not appear to have this issue when transferred over to Gen 7.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The Pokemon were all RNGed and transferred through retail games and devices after Gen 3, and their owners earned their ribbons by playing through the games and not by adding them using PkHex. The Gen 6 contest ribbons are legit and should therefore not be marked invalid in Gen 7.
Screenshots
The below screenshots are from Max. Optimizer from Smogon Wi-Fi. The Pokemon in these screenshots are Generation 3 RS/FRLG RNGs from Christian, a known and trusted RNGer at Smogon - they are Christian's personal Ribbon Masters. The same thing also happens to Colosseum RNGs from Luna Fantasia, though screenshots are not provided from the latter user:



Additional context
Add any other context about the problem here.
Christian, as mentioned above who is a trusted user took over the ribboning of my Suicune. He has ITA/PAL versions.
Those ribbons require OT affection values in order to be legal.
I did some investigating and found that the user who obtained the ribbons was able to obtain OT affection appropriately, but was using an unknown older version of PKHeX. I suspect this error is due to use of an older version of PKHeX that was erasing OT affection inappropriately (https://github.com/kwsch/PKHeX/commit/d794e71175a302dfce24f006147173b8de732808). This issue can be closed unless someone else demonstrates an in-game method of dropping OT affection.
Most helpful comment
I did some investigating and found that the user who obtained the ribbons was able to obtain OT affection appropriately, but was using an unknown older version of PKHeX. I suspect this error is due to use of an older version of PKHeX that was erasing OT affection inappropriately (https://github.com/kwsch/PKHeX/commit/d794e71175a302dfce24f006147173b8de732808). This issue can be closed unless someone else demonstrates an in-game method of dropping OT affection.