sendprop flattening improvements

encoder.py.