Fix a bug in LayeredRangeTree

 - this bug only affects the speed when using 3D or higher dimension
 - pass a 10000 times test in LayeredRangeTreeTest
 - LayeredRangeTreeTest 10000 testing time code is not commit (still 100)