
Staying inside doesn't help with generating Vitamin D deficiency, and the confusion is "related to what" here.
BTW, you're right that vegetarianism doesn't imply Vitamin D deficiency, but I also cut down on my milk intake around the same time (I used to drink a lot of milk), so while not necessary correlated, that's related on my personal timeline probably.