for nested functions the count of locals and the required stack size are miss-calculated, ie. No new count wasn't started for inner functions it makes the required stack size greater than or equal to it's enclosing functions stack size.
functions and classes are moved to constant buffer, and forward names are resolved for globals.
In addition tail call is not enabled for functions that doesn't return the last call (caused a bug).