So, just to be certain, you basically anchored the knock sensor wire harness and connector, so that it would no longer rub or bump up against other objects. Is that correct?
Seems very feasible. False knock is easily detected by the sensor, essentially from anything that may be tapping or rubbing or clanking in the engine compartment. The sensor basically "listens" for knock. It isn't foolproof.
Anything under the hood, especially around the sensor, should be stowed securely. Check out some of the false KR findings Mazdaspeed owners have dealt with over the years on MSF.