For Newer Super Mario Bros, you must patch your own New Super Mario Bros. DS rom with the patch provided on Newer Team's page: http://www.newerteam.com/ds/
Any time it looks like you're in an unwinnable situation that will require you to restart the entire game, it overwrites all your saves with that autosave.