sorry, PR14 wasn't robustly tested; this should fix all the reported issues (e.g., first scenario fails on subsequent runs, and/or exception: entity manager closed)