Fix #1226: Store minimal info in IR to construct hierarchy
Remove old deserialization hack
Merge pull request #1366 from gzm0/simplify-ancestor-info

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