Guard against shutdown/init races