When migrating from Drupal 5, the normal path would be to migrate everything (core/modules/themes) to the latest Drupal 5 versions, and then to the latest Drupal 6 versions, and then over to the Drupal 7 versions. How fortunate would have been the developers assigned the job if everything was as simple as that!