For ENG-5865, fix some issues around closing PBDs and then discarding polled buffers