Work around bugs in sequelize.