Add gate index to JSON layout output.