Yes, it's a bug, and my mod is at fault here.
This issue was also reported on GitHub here (currently unresolved). A few related comments have also been made about it here. I haven't looked back at the issue for the past month, but your post prompted me to look into it again. So I quickly hacked together a patch just now in an attempt to fix it. If you want to try and see if this resolves your issue, you can download the patched zip here here.
In the patched version (pre-release) there's an extra setting called Tracking Enabled. If you uncheck it, the mod will behave like it did previously, but with tracking enabled, it should keep all bonuses generated through research or other means.
I hope to hear from you again on whether this helps with your issue or not.