ProgramRewriter: Record begin/end keyword
ProgramRewriter: Fix huge bug due to confusion about begin vs kwbegin ^_^