IF a Rankins has the same requirements as a Beardie then here's what I suggest.
First, get rid of that substrate. I've heard the walnut shells can cause havoc in the digestive system, regardless of what the bag or pet shop tells you. I'd use either paper towels, shelf liner or washed playsand. Right now since you are trying to figure out what the problem is your best bet may be the paper towels.
The basking temps need to be 105-115. 90 isn't warm enough and that may be your biggest problem.
At four months old he should probably be getting calcium (only, not multivitamins w/ the calcium) dusted on his crix once a day. I don't know much about the vitamin D but a multivitamin like Herptivite should be used a couple times a week.
Unfortunately he may have been missing just a little nutrients somewhere and it probably finally caught up with him.
In addition to all of this I would take a fecal into the vet to rule out some common parasites. If he has never been checked by a vet take him with you since it is always a good idea to have annual checkups anyway.
Keep in mind all of this is from knowledge of Bearded Dragons and not Rankins. All I know is they are very similar but different in size.
Good luck!!
-----
Rob Talkington