The case will be retried so Apple is not out of the woods yet. The judge even says he believes that VirnetX could have successfully won its suit without the references to the previous trial.
The case can be retried, but it runs the risk of being tossed out because of the invalidated patents. If that were to happen, Apple might be able to recover some court costs.