It does look like Mary's maiden name was indeed GRANT.
In Scotland women's maiden names were given much more recognition and importance.
The deaths of Married or widowed women are indexed with both their name at death and their maiden name.
The Census might show them with their maiden name, even while they are living with their husband and more often, after they have been widowed. Their headstones, will often (generally?) be in their maiden name, and then followed by mention of her husband and his surname.
1891: 53 Land Street, Keith, BanffHead: William KIDD 34, Butcher, b Keith
Wife: Mary KIDD 29, b Rathven, Banff
Son: George KIDD 3?, Scholar, b Keith (suspect his age is NOT 3! possibly age 8. )
Dau: Margaret KIDD 6, Scholar, b Keith
Dau: Mary A KIDD 3, b Keith
Dau: Williamina KIDD 1, b Keith
IGI: Birth: Mary Jessie GRANT b 26 Feb 1862, Rathven, Banff
Father: ALexander GRANT
Mother: Janet JAMIESON
Scotlands People (SP) :
http://www.scotlandspeople.gov.uk/Marriage: 1882 in Rathven, Banff
William KIDD and Mary Jessie GRANT
(It was usual to marry in the parish of the bride)
Under the circumstances, it's a pity, that her MS was Grant
I still don't understand why if James birth cert said his mother was, literally : "Mary Grant or Kidd." but Maybe it was the fact she was a widow and mother of a child born 3 ys after she was widowed that caused the registrar to write it so?
Can't see any marriage after 1901 for a Mary Jessie KIDD in Banff - possibly she never remarried:
DEATH SP: Mary Jessie KIDD / other surname GRANT'
died 1921 in Keith, age 59
This death certificate might be important, for example if the name of the informant is a man to whom you have no known connection......
It is also possible, in theory - as you wondered - that James was the illigitimate child of one of his older sisters.
Certainley not unheard of for illigitimate children to be passed off as children of their grandparents - in the Census at least (and I'm sure in more that one or two birth certifictates where no-one is any the wiser to this very day!).
However....in your case, I'd be more inclined to think not. Mary Jessie herself was a widow and by registering James in her own parish under her legal names with it patently clear that the baby cannot have been concieved from her marriage (ie: no subterfuge there), she therefore illigitimises James. I guess she
may have been wiling to fall on that sword in order to save, more importantly to her, the reputation of an unmarried daughter - but probably not (or if so, probably never discoverable).
Cheers
AMBLY