tweak groovy module (fix for iterating empty environment and fix for one stream declaration)