When an overriding property containing willSet or didSet is not within a type, the type checker could crash due to a missing "self" declaration. Check this condition. Fixes rdar://problem/57040259.