React to roslyn changes. Also improved reference resolution