My proposed fix : https://github.com/rjolly/scala/commit/97e9d5645394173763b45f8395bca07d678ef49b