Flags have a tendency to end up in the wrong order whenever updates to landed_titles.txt are made. Deleting your flag cache usually solves the issue.
To delete the cache, do the following:
> Go go the Crusader Kings II folder in documents: Documents\Paradox Interactive\Crusader Kings II
> Delete the folder named "gfx"
> Start the game and the flags should be generated again
To delete the cache, do the following:
> Go go the Crusader Kings II folder in documents: Documents\Paradox Interactive\Crusader Kings II
> Delete the folder named "gfx"
> Start the game and the flags should be generated again