Migrated more logic from _rewrite_meter() to MeterManager.