SI-6913 Reapplies a lost fix by @viktorklang

https://issues.scala-lang.org/browse/SI-6913

This somehow got lost. Thanks to @rkuhn for pointing it out. 
https://groups.google.com/forum/#!topic/scala-internals/X1bgCpINb60