Fixes a regression caused by the `self` declaration being given a `DynamicSelfType` even though the formal type of the enclosing function sometimes still uses the concrete base class type. Fixes #83876 | rdar://158956768.