Scala compiler crash: assertion failed: javax.annotation.CheckReturnValue