Hmm your changes have a new problem:

```D
/// doc
void bar() { }

///
unittest { bar(); }

///
template Test()
{
    ///
    void foo() {}
}

///
unittest { int target; }
```

`target` appears in docs for the bar method, it should appear for the Test template instead.