Fix for https://github.com/sbt/sbt/issues/1648