I understand your problem.
First I need to tell you that there is no such condition named leaky gut syndrome. It us just a fake syndrome where there are no tests and medication to manage it. But history says hypothetically that it is autoimmunity disorder that which effect the intestines of a human leading to poor absorption and weight loss. But it is no way related to bones and so as ankylosing spondylitis is a genetical disease which is inherited from any one of parents. I hope I have cleared you doubts.