So...possibility for James in 1861 - all the children born in Cambusnethan:
John Dougherty 35 labourer coal b. Wishaw, Lanark
Elizabeth Dougherty 35 b. Edinburgh
William Dougherty 11
John Dougherty 5
James Dougherty 3
Thomas Dougherty 7 Months
Address: Cambusnethan
However, not sure if Elizabeth married John as I think the youngest Thomas was also registered as Brownlie:
Thomas Brownlie b. 3 Sep 1860
Birthplace CAMBUSNETHAN, LANARK
Mother's Name Elizabeth Brownlie
From this, and a guess from me, a possibility that Elizabeth took up with John Docherty after the birth of James. The youngest Thomas born after they got together. Someone has a family tree (maybe yours?) with the original marriage cert for James to Jane in 1890. One of the witnesses showing as Thomas Docherty.
It may simply be that James's birth was illigitmate, reputed father Docherty and mother Brownlie. Very common at the time for children to use either surname or simply decide to use one and then stick to that.
The other alternative on use of names
is as we are potentially seeing above for this James, whereby mother marries or starts relationship with new man and the child may decide to take on (and off) the name of the step father or mother's partner.
Who said it was easy
Monica