Fix regression in tbtools re Python 3

Introduced in 4381d6eff5e84f09d5f48d1ed79a3533c9030726
Merge branch 'tbtools_regression' into 0.9-maintenance

Fix #578