Fix association class mismatch errors when classes have been reloaded