FunctionAnalyser: fixes for new Type system