Collect expressions in a manifest will result in an attempt to use 4.x code that has not been loaded when the parser setting is future and an environment sets parser to current. The problem does not occur if the master prior to evaluating a collexpr in a parser=current environment has evaluated something in an environment where parser=future. This can be reproduced with this manifest, having main setting parser=future, and production environment parser=current.
1. Set parser = future in puppet.conf
2. Set parser = current in environment.conf for production
3. service pe-puppetserver restart
4. run puppet agent -t
5. Get the following error
The issue does not occur by simply enabling future parser or by using current parser but only in this specific configuration. I think.