Fix releasing samples when there's only one root sample.