Backport PR #4056: respect `pylab_import_all` when `--pylab` specified at the command-line

Earlier cleanup cleaned up a bit too much, ignoring this configurable.

should be backported to 1.x