Seems like an acceptable compromise. This SQL query seems to work:
UPDATE ir_model_data SET fs_id='shipment_out_create_shipping_button' WHERE module='stock_package_shipping' AND model='ir.model.button' AND fs_id='create_shipping_button';
There is a button, that is created with stock.xml and id of that button was changed in https://bugs.tryton.org/issue6389, so if this module (stock_package_shipping) was installed in 4.6 there is a button with the same name but different id in database. So migration fails with the following error:
In tag record: model ir.model.button with id shipment_out_create_shipping_button.
UserError: The button name in model must be unique! -