Not sure what you are doing here. It looks like you are rearranging the tabs upon pressing the nextTab / previousTab shortcuts. I imagined that when user switches the tab, their order in menu should not change...

I'm sorry if I am misunderstanding something.