As a note - Just using your function main() and replacing the levels with my own... I can not repeat this error.. Would lead me to believe the error is elsewhere or with one of the levels themselves.
Code:
function main(){	
	fps_max = 60;
	level_load("test1.wmb");	
	physX_open();
	while(1){
		if(key_1){ level_load("my_test1.wmb");}
		if(key_2){ level_load("my_test2.wmb");}
		wait(1);	
	}
}



Possible - Loading a level the exceeds the current nexus limit..