It appears that the helper function _correct_reference_buses! does not check generator status when creating the list of generators by connected components cc_gens. Possible fix: change line if haskey(bus_to_cc, bus_id) to if haskey(bus_to_cc, bus_id) && gen["gen_status"]== 1