[455] fix bug in constructing the base of an ArchetypeId and added testcase

Revision: 455
Author: sebastian.garde

Log Message: