Why only move this here? The next conditional only checks function arguments too. Does plugin_searchpath need to be protected?