setDynamic workaround for broken endgame scripts (Fixes #2016)

Didn't think it would happen, but we've hit a major problem that I have no idea how to fix without breaking other functionality. Any other fix suggestions?