@hadesian can you just tell the node to use the sheet you want to use by name? You might have to force the use of sheet name like this in some cases (AP-18133):
Maybe you can provide a sample workflow that demonstrates the problem.
Next thing you could do would be to inspect the internal workings of the sheet indexes but that might be too much.