Include pass and iteration indices in stack path