Catch two more edge cases for setting path.

1. Parent (or parent's parent etc) might not be part of object tree yet.

2. Parent might not have a name yet.