title: Can't retrieve XMPP messages by MAM after a specified id
body: <p>I'm writing an xmpp messenger. By my design it stores local message history. When the user comes online and opens the dialog with someone my program requests archive (XEP-313) from the last locally stored message to the last message the server archive has, using "after" tag.
  However it isn't working the way I expected it to.</p>
  
  <p><strong>The request</strong></p>
  
  <pre><code>&lt;iq id="qxmpp21" type="set"&gt;
      &lt;query xmlns="urn:xmpp:mam:1" queryid="qxmpp21"&gt;
          &lt;x xmlns="jabber:x:data" type="submit"&gt;
              &lt;field type="hidden" var="FORM_TYPE"&gt;&lt;value&gt;urn:xmpp:mam:1&lt;/value&gt;&lt;/field&gt;
              &lt;field type="text-single" var="with"&gt;&lt;value&gt;user1@domain.org&lt;/value&gt;&lt;/field&gt;
          &lt;/x&gt;
          &lt;set xmlns="http://jabber.org/protocol/rsm"&gt;
              &lt;max&gt;100&lt;/max&gt;
              &lt;after&gt;5d10ba97-9ce8-46d4-9547-4f5e91e4ac19&lt;/after&gt;
          &lt;/set&gt;
      &lt;/query&gt;
  &lt;/iq&gt;
  </code></pre>
  
  <p><strong>The response</strong></p>
  
  <pre><code>&lt;iq xmlns="jabber:client" id="qxmpp21" xml:lang="en" xmlns:xml="http://www.w3.org/XML/1998/namespace" type="result" from="user2@domain.org" to="user2@domain.org/QXmpp"&gt;
      &lt;fin xmlns="urn:xmpp:mam:1" queryid="qxmpp21" complete="true"&gt;
          &lt;set xmlns="http://jabber.org/protocol/rsm"&gt;
              &lt;count xmlns="http://jabber.org/protocol/rsm"&gt;465&lt;/count&gt;
          &lt;/set&gt;
      &lt;/fin&gt;
  &lt;/iq&gt;
  </code></pre>
  
  <p>I use qxmpp library and ejabberd as a server.</p>
  
  <p>Am I doing anything wrong?
  Thanks in advance!</p>