Do not call (Un)registerMessage in UpdateDynamicUnits unless it is really needed, as suggested by ckaotik.

This should reduce CPU usage. See #16.