Fix for function that removes delegations from list during state_unlock()