Fix some issues with filtering double spends