Fix offset calculation for multi-type legacy images.