Use MessageList.first() and last() wherever possible

- Related issue: #1530