fix(tabs): keep stable tab order - more robust implementation, added more complex test