The primary key was not specified first in the KEY instruction.
Reorganise the key definition so that you specify the primary key first.