fix issue 6677 - static this attributes position

This is a rebase and update for https://github.com/D-Programming-Language/dmd/pull/2459