Merge "Backport: Work around a type inference change in javac"