Workaround some solver scripts: run check with closed stdin

Should solve #1581