Adds a work-around for a javac type-inference bug.

The workaround is for
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6302954.
this bug is present in at least the jdk version 1.6.0_23.