The Sheltie is prone to epilepsy and this does not always manifest in full blown seizures but can show odd behaviors. These behaviors can last from moments to days in duration. Some dogs pace, hide, wander, stare, become clingy to the owner or the opposite, snap at imaginary bugs,become frightened, lick, and there are many more behaviors that may be seen. Epilepsy has different components to seizures, aura or partial seizures may be what you are seeing. I am going to direct you to sites on this but I would keep an eye on the dog for other abnormal behaviors and document them so you can discuss this with your vet.