Fix for casting/subclassing in MetricRegistry