There are different qualities of basting guns. The ones that work best use the smallest tacks. With the bigger tacks, you can try the needle in-and-out that someone else mentioned; basically both ends of the tag are on top so it's like pinning -- no opportunity for shifting.
Once I discovered spray basting, I quit using my basting gun.