Compiler construction difficulty in supporting first-class functions that capture variables without dynamic memory allocation