[#2696] Fixed Scala regression