#548188 by Berdir | igorik, jaron: Fixed validation and sorting bugs triggered by privatemsg_to.module.