More fixes in overload matching and type restrictions