Thanks Rob. Yes, I agree, James is different from the others. Either he is an uncle, or perhaps he is a half brother, the son of John's first wife (if he had one) and the informant to his death certificate, James' son James, was incorrect in naming his grandfather as James (rather than John). This seems odd, particularly given that it is the paternal grandfather, but I think I've seen that in other families where the name is known with certainty retrospectively and the informants erred.
The only birth record I have is that for John Hamilton in 1810. (Are there any others? I could not find any for his siblings.) In the parish register of Keir, Dumfries-shire, "29 March a son of John Hamilton & Anna Scott in Winsover named John". The parish of Keir is in Nithsdale. Windsover is a short distance southwest of Auldgirth Bridge and can be seen here
http://www.streetmap.co.uk/map.srf?x=284500&y=590500&z=120&sv=Keir&st=3&tl=Map+of+Keir+Hills,+Dumfries+and+Galloway+[Hill/Mountain]&searchp=ids.srf&mapp=map.srf or here:
https://www.google.co.uk/maps/@55.155916,-3.7208389,3a,75y,346.66h,80.72t/data=!3m4!1e1!3m2!1sto1CrANubiowJiSnmcnr7w!2e0?hl=en .
I do wonder if there would be any records of that farm that would show a change of tenancy historically, which could help us track the Hamilton family. It is odd that they don't seem to appear in the parish records much.
Back to James' (b. 1791) parentage. We know that his first son was James and his second daughter was Elizabeth. On the other side of the family, brothers George and John (sons of John and Anna) both had first sons John, which we know to be the name of their paternal grandfather, and second daughters Anne, the name of their paternal grandmother. It doesn't prove anything, but if we say that James was using the same pattern, then he is the son of James (matching the death record) and Elizabeth. This would suggest he is an uncle rather than half-brother. We also know that James' wife, Marion Callender, was the daughter of James and Grace ("Grizel"). James and Marion's first daughter was Grace, indicating perhaps they followed the pattern.
I would love to find more information on this family further back but they are proving elusive!
Jamie Reid