EZP-20805: Fixed a regression when running console scripts
Merge pull request #346 from ezsystems/regression-EZP-20805

EZP-20805: Fixed a regression when running console scripts