Made workaround for scalac bug

https://issues.scala-lang.org/browse/SI-7424