Lookup typealias in enclosing declaration when writing type