CB-6823 Improve test for is source path ancestor when using copy-from or link-to