core: fix crash case with provisioners [GH-4281]