It is my understanding that a company can get in trouble if they layoff US citizens WHILE hiring H1Bs. That could be considered discriminating against workers on the basis of their citizenship status. This however doesn't seem to be your case.
If I want to be 100% sure, I would double check with a lawyer. I doubt that the employer wants to take risks, so I would also take advice from the employer's lawyer.