Fix casting issue with weigher; tests no longer using raw keys