Conrad
They cannot be the same woman as Mary PRODHAM nee KNAGGS is in the 1851 census as is Mary HANSELL. Mary HANSELL died later that year and is buried at Lythe. Note that the information in the MIs for Lythe are in error. Mike HANSELL, who is the one trying to solve the origin of Mary KNAGGS, noted the realfacts some decades ago.
It is possible that the Mary KNAGGS who married John HANSELL in 1822 in Whtiby was married before but this is unlikely since she was described as a Spinster when she got married.
Bryan