Hi Caio,
I'm not sure if there's a way to customize the coded order of accidentals, and for some reason tweaking the X-offset property doesn't seem to work either. In your case, making a couple of manual tweaks to the flat's and double-flat's extra-offset properties (which are added after all the positioning calculation is done) will at least get them in order. The only downside is that there's extra space between the accidentals and the barline, left over from calculating the accidentals' original positions. I'm not sure how to get rid of that...
\relative c' {
<c ges' beses d!>1
<c! \tweak Accidental.extra-offset #'(2.2 . 0) ges' \tweak Accidental.extra-offset #'(-0.6 . 0) beses d!>1
}
Hope this helps,