fix #2778, improve dataflow of finally blocks