AVRO-1094. Java: Fix specific compiler to better support non-default templates. Contributed by Ed Kohlwey.