Make sure we don't overwrite the source for a tree, closes #3540 @2h