Fix for an old issue: Node names need to be unique to ensure proper preview image mapping (node instance keys are generated from node names). This caused problems with some of the old test files (e.g. compo_map_zcombine_cubes.blend).

When the uniqueness requirement was introduced in r24478 (2.50.8) for unambiguous RNA paths for animation a do_versions check was also added, but this was incorrectly only applied to main->nodetree (i.e. node groups) and not local trees in scene, material, etc.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55420 954f8c5b-7b00-dc11-b283-0030488c597c