Check for none in innerheaders

This was causing a bug, among other things, when saving to the Sent
folder for some messages. Closes #4914