Fix an issue w/o memory access on compact_whitespace