When a module has been replaced/renamed several times within a migration path, the generated odoo.module.branch.migration is showing only the first renaming/replacement that occurs, instead of showing the last available module for the target branch.
Example
E.g. given a migration path 14.0 -> 18.0, module mass_operation_abstract in 14.0 has been replaced (merged into) by mass_editing in 15.0, and then renamed to server_action_mass_edit in 16.0.
Current output
Generated odoo.module.branch.migration for 14.0 -> 18.0 indicates that mass_operation_abtract has been replaced by mass_editing, which is wrong.
Expected output
Generated odoo.module.branch.migration for 14.0 -> 18.0 indicates that mass_operation_abtract has been replaced by server_action_mass_edit (last available module name for Odoo 16.0 and above that is replacing mass_operation_abstract).