Fixed an inconsistency between hasNode checks and addNode checks.