Fix duplicate entity logic in SquashSpec.dump