The issue noted here could also come up via groups: there may be parts of the combined marker that only apply if a particular group is installed, or a particular install root is requested.
Which means we may want to revisit the idea of adding a marker syntax for groups (in this PEP, not the groups PEP, since the base PEP doesn’t have a use case for it). Then the path dependent parts of the specifier could be qualified with things like group = "dev" (and roots could get synthetic group names like group = "via-root-A").