There was an implicit assumption in the code that callers
wouldn't hit the notify_*damaged paths twice because they would
have checked is_*_damaged paths first.
However, that's not really true in all cases, e.g. scrub
code isn't required to respect existing damage entries
when trying to load a CDir.
Simply fix this by having the DamageTable notify* functions
check the key they're inserting doesn't already exist.
Signed-off-by: John Spray <firstname.lastname@example.org>
(cherry picked from commit c9cfaef)