Hello,
It seems to be working fine with build 5.0.20133.367. I have tested the issues and it seems to working absolutely fine for both the scenarios.
Please download the build from here and let me know if the issue still persists.
Have a look at the attached image showing decreased number of VisualTree instances on removing the last tab.
Thanks,
Deepak Sharma