the tabclose event is fired for the selected tab. It should be fired for the clicked one.
I searched here and found this thread "Withcloseicon event: Which tab is it?" after getting the wrong source reference.
I attached two test cases. The first one uses the source reference id. The second one uses distinct invoker classes as described in the thread. In both cases clicking the close icon You will get the selected tab.