Fixes #1999 - Don't crash on special unloading and loading combinations