This code block is repeated twice in this PR. Should be put into a method instead, e.g. `getNodeByPathorUuid($pathOrUuid);` - infact should the `DocumentManager` be talking to the `Session` at all? // cc @dbu, @lsmith77