em.flush before index prevents null DatasetVersion id #711