Unbreak TR's top-level

A recent change I made broke optimizations at the top-level
Fix expected type in test