code: public static Instance findRootInstance( Instance instance ) {
  
  		Instance rootInstance = instance;
  		while( rootInstance.getParent() != null )
  			rootInstance = rootInstance.getParent();
  
  		return rootInstance;
  	}
docs: Finds the root instance for an instance.
  @param instance an instance (not null)
  @return a non-null instance, the root instance