genPkgIndex: Make copy of importables before deleting elements.
Fix "incompatable" -> "incompatible" typo.