[#2401] Bad package name generated when <packageName/> contents are not
trimmed