Very simple mod to demonstrate the FPS loss from this bug. Simply start a new game or load up a save, and watch as your framerate drops over the next 3 minutes to become nearly unplayable. Please do not keep this enabled for actual gameplay
Personally tested and confirmed working on 1.4.15 (VR), 1.5.97 (SE), 1.6.640 (AE Steam), and 1.6.629 (GOG). Lower AE versions should work, but is untested.