Escape analysis and block based optimizations bug fixes