[fix] do not trigger callback twice

  This commit only executes the after_setup hook / callback once, in
case the callback itself raises an exception

Change-Id: I2dbe91280bed54715a88161bf1938a0772743d66