Fix bug in get_reduced_structure with disoredered structures