MAM is used to retrieve message archives. As archives can get quite large, clients can specify what part of the archive they'd like to obtain. That's done using RSM. One of the options provided by RSM is to 'page backwards', meaning: get the messages just before a certain index or element.
Our MUC MAM RSM (... yeah!) implementation does not handle this correctly. When a client asks for 'the last 50 results', it actually receives the first 50 results instead.
Fixed in Monitoring plugin version 1.6.0.
It is still broken in Smack 4.3.4 and Monitoring plugin 1.8.6
queryLastPage() still returns the first page instead of the last page.