Fixed mark_component_nr into BFS.