fix(compile): prevent memory leak with top level whitespace