Fixed a couple bugs. Looking more and more like I made some bad choices
for the order of tree transforms here. :\ Anyway, generally getting
correct solutions, if not fully desirable ones. God damn, language /
parsing / etc. hueristics are hard. D: