Hi BAC3,
If the Thomas FORREST in 1881 with Mary GALLACHER/McMANNERS is 'your' Thomas, it seems quite unlikely to me, that she is the mother of any child he might have had in 1862 at the time of his trial.
Mary was producing children with her husband James GALLOCHER / GALAGHER between 1860 and 1870, though by 1871 James has possibly either disappeared or died:
1861: 6 Kirkgate, Hawick, Roxburgshire https://familysearch.org/ark:/61903/1:1:VB7C-RQ4 Ref: Parish 789 / ED 7/ Pg 3 / HS 14
Head: James GALLACHER 24, Hawker, b Ireland
Wife: Mary GALLACHER 21, Hawker, b Hawick
Dau: Catherine GALLACHER 6 mths, b Hawick
1871: 6 Howegate, Hawick, Roxburgshire (not EGSETER A*y, https://familysearch.org/ark:/61903/1:1:VBL1-L5R Ref: Parish 789 /ED 7 / Pg 16 / HS 83
Head: Mary GALLOCHER 30, Hawker, b Hawick
Dau: Catherine GALLOCHER 10, Scholar, b Hawick
(not Isabella A*y, Dau: Mary GALLOCHER 6, Scholar, b Hawick
Dau: Sarah GALLOCHER 2, b Hawick
Son: John GALLOCHER 6 mths, b Hawick
Father-In-Law: John McMANUS 69,(occ)------------?, b Ireland
Boarder: James DUSS?? 50, Tailor Journeyman, b Dundee
From Family Search - BIRTHS: Father: James GALLACHER (GALAGHER)
Mother: Mary McMANNUS
All Born Hawick Roxburgshire: Catherine GALAGHAR b 11 Jul 1860
Sarah GALAGHER, b 26 Jan 1862
James GALLACHER b 17 Dec 1863
Mary GALAGHER, b 27 Mar 1865
James GALAGHER b 26 Oct 1866
Sarah GALAGHER b 26 Oct 1868
John GALAGHER b 13 Oct 1870.
The 1881 Census in full, is more interesting, as it indicates Mary is the mother of a FORREST child born 1873/74 in England - Thomas' child?
CENSUS 1881: 7 Round Close, Hawick Roxburgshire Parish 789/ ED17 /Pg 24/ HS 95
Head: Mary McMANNERS or GALLACHER 40, licensed Hawker (small wares) b Hawick
Dau: Catherine GALLACHER 20, Licensed Hawker, b Hawick
Dau: Mary GALLACHER 16, Licensed Hawker, b Hawick
Dau: Sarah GALLACHER 12, School, b Hawick
Son: Thomas FORREST 7, School, b Borgland, Northumberland
Gr-Dau: Mary GALLACHER 2 , b Hawick
Boarder: Thomas FORREST 51, licensed Hawker (small wares) b West Calder, Midlothian
Unsure about 'Borgland' but FreeBMD has 2 possible birth Rego:
Dec Qtr 1873: Thomas FORREST, reg: Bellingham 10b, pg 312
Dec Qtr 1874: Thomas FORREST, reg: Berwick 10b, pg 411
Of the two, I think the Bellingham one more likley. As the Berwick one seems to be on Census in England (parents are English, and named Thomas & Mary Ann).
However, there are a number of Thomas GALLAGHER (& var) Birth regos in Northumberland too, which could be him.
Cheers
AMBLY