Fixed small memory leak in ast simplify