If USCIS mistakenly return your application, you should be able to keep the first priority date and still be able to get your H1.