db.mapper: fix always recording maxver in encode()

wow, very bug, much old, such fix, wow