The will and inventory of the estate of Thomas can be downloaded from the ScotlandsPeople website for 10 credits - 5 pages long. The will may help clear up some relationships e.g. he might say whose son James is.
I did find this:
Sir Alexander Ramsay, 6th Baronet, at whose death 6 Feb 1806 (the title) passed to his kinsman and heir-at-law, Sir Thomas Ramsay, colonel EICS 7th bart who m 1819, Elizabeth, relict of The Chisholm, and 2nd son of Duncan Macdonnell, of Glengarry, and Mary his wife, daughter of Sir Ludovick Grant, Bart. of Dalry. Sir Thomas d.s.p. in 1830, when the baronetcy became extinct. His widow died 7 Oct 1859 aged 82. Sir Thomas's estates had devolved by bequest of Sir Alexander, 6th baronet, on his nephew, Alexander Burnet Esq, 2nd son of Sir Thomas Burnet Bart of Leys, by Catherine Ramsay, sister of the 6th baronet.
Also found this
http://archive.org/stream/cu31924092524382#page/n321/mode/2upWhen the baronetcy was created in 1625, it was granted to the grantee and the heirs male whatsoever. Presumably this is what created confusion in 1806.
Nell