allow more operations to work on detached streams (closes #23093)

Patch by Martin Panter.
merge 3.4 (#23093)