This was already fixed in c9bea05f44, but the fix does not seem to work. This commit uses a set union, which should be more robust. It also adds a couple of assertions to verify that it indeed works.
c9bea05f44
init
capnp.types