py: Partially fix viper multi-comparison; add test for it.