Fix assertions when mixing Metric[Int] and Metric[Double]