make docking work again

The code to sync up system-level damage and part-level damage
broke how docking worked.
fix off by one bug in damage distribution code