Fix crash in stats mod when non-players dig or place nodes