Rename idChain to idPath and fix generation function so it doesn't use the generated ID.