Fixes insertion in MySQL older than 5.7.7 and MariaDB older than 10.2.2 that limit indexes to 767 bytes. This may be a temporary fix until future refactoring