This more intuitively matches `types.either` and allows paths to be coerced to submodules again, which was inhibited by #76861
This more intuitively matches `types.either` and allows paths to be coerced to submodules again, which was inhibited by #76861