Unless the RAP is factory defaulted, the RAP is running the same software version as the controller. If your wired ports or VAP on the RAP is in split-tunnel or bridge mode, you can browse to rapconsole.arubanetworks.com on one of the RAP connected laptops/PCs and see the version as well. Additionally, if the RAP is connected to its controller, you can show the RAP code version by issuing: "show ap image version" from the CLI of the controller.
When you perform your resolution procedure, are you factory defaulting the RAP and reprovisioning the RAPs? What IP address are you using for the LMS in your AP system profile? Is that IP address accessable from the Internet? I'm thinking the RAP's aren't losing their profile but they are losing connectivity to the controller. In which case your VAPs are gone, unless you have a VAP in backup mode, and the wired ports won't get you anywhere unless you have some additional configuration on the controller.
Also, 5.0.1.0 is really old. Consider an upgrade to 5.0.4.2 or perhaps 6.x if your controller supports it. Consult your SE before doing an upgrade though.