Fixed a bug in `StreamSender`

(it worked incorrectly for group nesting levels >= 3) and added a test for it