Fix for when a Template has an Exception, it is removed from the cache.