getEntityGraph and its DocCode tests cope with dup and null root edge cases