[C++]: free header IR when reading in new collection. Fixes #169.