Hi Alan,
My Blains left before the 1851 census, and at least one of them - John, b. 1820, was in Greenock in 1845 because I've found his marriage record there then! So I assume that the family moved to Greenock between 1841 and 1845.
Any information before that is very welcome! William Blain and Mary Maxwell married in Inch in 1812. However I don't know where either of them came from. What I do know is that there was a family of Blains in Inch - Peter Blain and his family - in the 1841 census, with a very similar set of first names (including Jess, Thomas and William).
Blains in Wigtownshire in the mid 19th century - and probably a bit earlier - seem to have included quite a number of Irish immigrants, in addition to more 'indigenous' Blains. Interesting!
Jenny