Eric, you're right on target. "Tam O'Shanter" first saw its appearance in Francis Grose's THE ANTIQUITIES OF SCOTLAND AND WALES and Grose, a captain in the militia and famed for his ability to hold his liquor, apparently developed a friendship with Burns, a famed tippler in his own right, when he visited Scotland to do research for his book. No doubt they "lifted" a few. Burns even wrote a satirical poem in honor of Captain Grose ("On the Late Captain Grose's Pregrinations Thru Scotland Collecting the Antiquities of That Kingdom."
But wad ye see him in his glee --/For meikle glee and fun has he --/Then set him down and two or three/ Guid fellows wi' him;/and port, O, port! shine thou a wee,/ And then ye'll see him!")
You need a copy of THE MIRROR'S IMAGE (Owlswick Press, 1978). Send me your mailing address and I'll drop one in the mail to you. I wish I'd held off on writing that book because it'd have made a fine MA thesis.
Burns eh? Hopefully I can live up to my last name then.