Fixing a type constraint solver bug submitted by Jaak Randmets,
verified by Iavor. Regression tests passed.