The lander didn't have sensors on its feet, so my guess is there may have been two conditions to check for "on the ground": either a vertical speed of 0m/s (gyroscope), or an altitude of 0m (radar).
Given that the parachute was deployed at the correct time and its deployment was governed by air speed (to be deployed around 1mach), the gyroscopes were likely working correctly. The radar detection wasn't available until after deployment of the parachute (more specifically, after ejecting the heat shield, which occurred at the same time), so if the machine's decision was based on faulty input, the doppler radar is likely to blame.
It is also possible that the sensors were working correctly, but the inputs were processed incorrectly. I'd expect that an issue like that could have been caught while testing the lander on earth...
edit: it's also unlikely the engines would have kept firing after computer malfunction: there were multiple (9 iirc) thrusters all around the craft and they were fired independently using pulse-width modulation. This approach was intended to both slow down the descent and to stabilize its course/orientation.