When practicing, make sure your mind is clear on what you want. Often we practice with an unclear mind, and this becomes the norm. I've noticed myself and my students perform a phrase numerous times. When it finally reaches a point of clarity and brilliance, we move away from it immediately. This is actually the point in which the repeats should begin - not stop.
The mind has a tendency to want to stay comfortable, and comfortable can be a state of clarity or confusion. Whatever it is used to, it will want to return to. If a guitarist with an unfocused approach suddenly gains clarity, the mind will want to move away from that state - it will want to get back to its "comfort zone of confusion". This is very common. We want to watch the mind, notice when it is urging us to move forward hastily, and calmly bring it back. We want to repeat the clarity we've attained so that it becomes the norm.
The mind is like a record with grooves. The grooves we want to firmly entrench involve clear ideas - what notes are we playing, what fingering, what tone, etc. etc. Get your idea clear before you start to drill a passage, otherwise you drill vagueness. Either way, we reap what we sow.