Added a missing detach() to List