Rode is about 5 miles from Frome, have you found John's baptism in Rode? I would try and trace both families with parents James and Mary both in Frome and Westbury, see if there are siblings, were they still around in 1851 to give a clue to birthplace etc. Are there any other Cox baptisms in Rode?
Also try checking John Cox after the 1851 census, does he consistently state Rode as a birthplace? It's a bit like a jigsaw puzzle but you may just find a clue.
Good luck
Shirl