Fix crash when trying to dynamically add a class that has already been added to the runtime.