Fix check for existence of parent
am: 5835a6fccf

Change-Id: If8197bbbef281dacbdd6e0b3a00f3dce39ae08de