Versioning. "This version of SharedComponent has this and that functionality" and "this version of OtherComponent requires this specific version of SharedComponent".
If you're getting stuck with significant "this has to come with for that to go" problems - that aren't literal dependencies, but arise from code wonk or poor separation of concerns - you may have some "architecture smell" that could be addressed. Obvious "usual suspects" include things (whether at a single class, component, or entire service level) that have too many responsibilities/purposes/reasons to change, and mismanaged abstraction.
Because if you don't keep a close eye on mental patients, some of them might hurt or kill themselves or other people - sometimes in extraordinarily resourceful and unexpected ways. It's rare and overhyped, but the fact that it does happen means the system needs to account for it. Then add the usual amount of greed, incompetence, stigma etc., and suddenly the only way of accounting for that is, well, prison style.