Gus did this when he was a puppy. He goes potty outside so that made it easier to break the habit but a lot of them just grow out of it.
Be careful with the garlic. It says large amounts would need to be eaten to cause illness but it is on the list of dangerous foods for dogs. Here...
http://www.yorkietalk.com/forums/showthread.php?t=43555
Welcome to YT.