Do not detect backtracking when the snapshot is invalid
Do not detect Type2 backtrackings caused by Paste
Handles null snapshots better