Fix two memory errors by interning earlier