Scala 2.9 backports

backport #436 

@edani this cherry picking is becoming a PITA... I'll move to merging and rewriting history soon, which means no need to have the "Needs Backport" label. I think I must have reached this conclusion last night, actually, which explains why the label was deleted.