Issue #2390787 follow-up: Fixing bug with syncing of goals on deletion of a goal