How about [this change](https://github.com/9rnsr/dmd/commit/711ebb6d98f94498783f603d351530564588b003)?
Feel free to cherry-pick and push here.

In basic, `lastDecl` is a local state in DeclDefs parsing. When declaration scope is nested, it is always parsed by `parseBlock`. So you can take the local state to it.