fix issue where packages may have duplicate declares