Fix incorrectly defined index on definitions table