The name returned by get_name is the name of an element <name>, but not allways the name of the element <trk>:
For the joined gpx file, the name returned is a waypoint name instead of track name which is inside <trk><name>...</name></trk>.
bug_name.zip