Fix an __import__ that was causing a cache dumping problem.

The cache registry no longer guards against models being imported
multiple times, so certain uses of `__import__` will cause things to be
sad. We should move away from `__import__` in general (use importlib, or
get_model, or something more sane instead), but this fixes the
instance that was problematic.

(cherry picked from commit 666053f539c5b3ebae49b192f855b459aeb17e22)