The workaround leads to an out of memory error in the late game. If someone has an working workaround, feel free to share it here.