Move no-plugin error case earlier within with(), and add some tests.