In a release of WPF after 2015.2.728 (up to and including 2020.2.617) the ability to programatically set the DisplayIndex of a GridViewColumn was broken, in what seems to be a bug (it used to work fine, and I'm not sure what behaviour you could achieve with this bug in place). I haven't pinpointed the release, as a lot of releases have happened during that time!
I've attached a simple example which demonstrates this bug, you just have to change the boolean constant in the code behind file from `false` to `true`, and you'll see that the group header no longer shows. If you go back to release 2015.2.728 then this works, but now it only works if you set DisplayIndex to -1 (anything else causes an argument exception, as there's a mismatch to the number of columns, which makes sense). If you don't have the header group then you can obviously change the DisplayIndex as required, but as soon as you do, it breaks the header grouping.
I'd post the code solution if I could, but it's pretty simple, you don't even need the public class in my code behind, that's there just to make the column group header obvious.