Fixed private field access by upcasting.

See also https://issues.scala-lang.org/browse/SI-8426