FP: flush m_code_level & check emptyness of m_end_offsets
Merge pull request #359 from raven02/patch-2

FP: flush m_code_level & check emptyness of m_end_offsets