Fix #1104: Separate IRTrees and JSTrees.

Hahaha, type safety ftw