Pass env to chunker for use in error messages
Fix LessError being used before being defined