use the main package identifier only if not present in branch/tag
Merge pull request #1 from mpoiriert/fix-2249

use the main package identifier only if not present in branch/tag