make Plugin::scan safer