Backport fix to ignore trailing args in aliasByMetric() for 0.9.x

refs #862 #884