mam.lib, mod_mam: make the logic to determine wheter there're too many results or not more solid.
mam.lib: fix silly global indexing...