Fixed #10 (this actually works around a Scala bug, see https://issues.scala-lang.org/browse/SI-8357).