Fix issue #16: use inverseStage instead of inStageIndex: Staging.currentStage contains the stage index shown in the UI, whic is backward. inStageIndex is either 1 or 0.