Fixed generation of sequence queries in DB dumping tool.