When a jury has been impaneled in a case contemplated by section 29-2018, such jury may be discharged without prejudice to the prosecution.