When reading the map file, use Mako-specific classes only if they are
imported.