fix AR and EC matrices when `equation = C` results in a simplified equation

1 job for master in 1 minute and 22 seconds (queued for 6 seconds)