The tree nodes you're referring to are called cluster group nodes and are rendered with one per unique resourceType/resourceKey tuple. For EAP5/AS6 wars/ear resources, the resource key is the deployment name reported by the AS profile service (e.g. vfszip:/opt/jboss-5.1.0.CR1/server/default/deploy/foo.war). Unfortunately, as you can see, it includes the full path to the war or ear file, which will potentially vary if the configuration set dir is different across AS instances. Given your use case, if I could go back, I'd consider stripping off the config set dir portion of the URL and using the remainder as the key (e.g. deploy/foo.war). This would have been tricky though since apps could potentially be deployed somewhere outside the config set dir (e.g. /opt/myapps/). In any case, changing the resource key at this point would be fairly involved, as we'd have to support upgrading existing resources that use the old key format...
For more on cluster groups, see http://www.rhq-project.org/display/RHQ/Design-ResourceClustering.