Handle missing messages and bad index entries
When expanding the results of a chain query, if the message is not found or the index entry is bad, return an error record instead of failing or returning no value.
When expanding the results of a chain query, if the message is not found or the index entry is bad, return an error record instead of failing or returning no value.