Use correct type resolve context when resolving attributes.

This makes this compile (as it should):

    [My(P)]
    public class C {
        sealed class MyAttribute : Attribute { public MyAttribute(int x) {} }
        public const int P = 42;
    }