The source project of this merge request has been removed.
Probable fix for probable issue
I believe the previous code was wrong in that the weights were not used correctly and the splits were arbitrary.
Please test review as I don't have an easy way of testing this atm.