Fix bugs in EC code introduced with FIPS changes.