Added a check for closure in the compiler