Fix inclusion of explicitly added profiles in jar

Closes #1701