compiler: java: fix bugs in new Builder.set code