A reference to a subscript (whether instance or static) produces a
function type, which is then applied as part of an application
constraint. Make sure that we encode whether the subscript can throw,
and the thrown error type if present, in that function type. This lets
us correctly treat subscripts as a potential throw sites.