Rigidity of a non-elliptic differential inclusion related to the Aviles-Giga conjecture