fixes #195 foreach element outputs open and close values even when the passed collection is empty.