deal with infinite loop in diagonalization attempt in datatype factory

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>