Merge "Fix pattern snapping to incorrect dots." into main