The latest AI layoff reversals offer a warning for leaders: map the work before you eliminate the people doing it.