simplify compare_stage_keys