Yes running lean would cause knock, however if your MAF was not working because of a bad ground, your car would be running pig rich, not lean.
1991 Mitsubishi Eclipse GSX - SOLD2006 Mustang GT Convertible