Fix message contruction when raw head is nil

This makes the queue implementation not even bother constructing the message if there is no new item.