refactor verifyLegalStageColoring to work before pipeline registers are actually inserted into graph