Changing hardware ID width protected against corruption