Followup for bc989831. The original reproducer still works w/o the unref, and doesn't work with this change. (cherry picked from commit 13bb1ffb)
mentioned in commit 0de0716e
mentioned in commit c15e100e