As part of the work for
SERVER-18940 we changed 'fromRouter' to mean 'command came from mongos', instead of its previous meaning, which was 'output from this command is going to be merged with output from other shards'. For the latter case, we added another field, 'needsMerge'.
In a 3.4/3.6 mixed version cluster, a 3.4 mongos will set 'fromRouter' when talking to a 3.6 node, which will not interpret that as meaning 'needsMerge'. This can cause problems like the 3.6 node failing to serialize metadata such as the sort key.