onTabChange problem? Maybe bug?

I’ve encountered a problem with the onTabChange property.

var vLastIndex = arguments[0]

This results in the last tab index. But the problem comes now.
I’m making a method for history back/forward buttons that also remembers the tabindexes. When I click on the back/forward buttons (see code for the method below) it doesnt result in the lasttabindex like it should.
For example: I click on Tab 1, tab 2 and tab 4, then I click the back button. But the index is now set to Tab 3, however the last tabindex is 1 (Tab 2).

Add to history

vMyObject.type = 'tab'
	vMyObject.formname = currentcontroller.getName()
	vMyObject.table = forms[vForm].foundset.getTableName()
	vMyObject.server = forms[vForm].foundset.getServerName()
	vMyObject.lastTabIndex = vLastIndex;
	vMyObject.tabname = vTab

Back in history button:

			var vTabIndex = vObject.lastTabIndex
			var vTab = vObject.tabname
		application.output('TI::: ' +vObject.lastTabIndex);
			forms[vForm].elements[vTab].tabIndex = vTabIndex

Am I doing something wrong in the Method, or is this a Servoy issue?