The title of this function, `set_master_or_detached`,  is confusing to me; I don't see how it's setting anything.

Is this a better name: 'is_current_at_master_or_detached'?