ch.py: fix for assignment through reorderings with nan's