This reverts commit 8eceb5f1e2. Turns out the gui package is needed for screenshots in this case.
8eceb5f1e2