Fix #1226: Store minimal info in IR to construct hierarchy

What is this for?