This is the same problem that was fixed by c58f7aa4 on master. Instead of relying on hash table iteration being stable, pass the GVariantBuilder down and add directly to it in the right order.