On the structure of the self-sustaining cycle in separating and reattaching flows