correctly handle None state_keys
correctly handle None state_keys

and fix include_other_types thinko

matrix-org/synapse,matrix-org/synapse,matrix-org/synapse,matrix-org/synapse,matrix-org/synapse,matrix-org/synapse