It wouldn't hurt for you to be tested for gluten sensitivity/celiac disease if you haven't been. It can co-exist in someone with pernicious anemia, and can
also cause brain lesions similar to those caused by B12 deficiency, or MS.
Polyglandular Autoimmune Syndrome, Type III
http://emedicine.medscape.com/article/124398-overview
Gluten sensitivity can also cause other neurological symptoms similar to B12 deficiency or MS, including cognitive decline. It can occur in tandem, and if so, would prevent full recovery unless also dx'd and treated.
http://www.medicalnewstoday.com/articles/53741.php
Brain fog is a common complaint in those with gluten sensitivity, but of course, brain fog is common in so many conditions. I've had two waves... first before my hypothyrdism dx and then ten years later before my B12 deficiency dx. Still have it a bit... but not pea soup like it used to be. Be sure to keep your eye out for thyroid disease in the future... assuming you've been tested for it?
Diagnostic testing for celiac disease/ gluten sensitivity
http://jccglutenfree.googlepages.com/diagnostictesting
You might also find some info in these links of interest.
http://jccglutenfree.googlepages.com/multiplesclerosis
http://jccglutenfree.googlepages.com/b12deficiency