Add unit test for the weighted compact table
Bugfix for the new unit test.