Fix SI-6853

This is a fix to: https://issues.scala-lang.org/browse/SI-6853
I could not assign it to myself on JIRA, even though I am user my name does not show up there.
review by: @phaller