Merge "MessageQueue tail tracking - fix wakeup logic" into main