fixed #207, improved flow analysis for closures