#9 rehash after cleanup to avoid double generation of metadata