Merge "Fix a crash in Metrics code."