The beta limit in the Advanced Toroidal Facility due to local ideal MHD instabilities