Add regression test for pseudo-hierachy via iterator delimiter and prefix.

Fixes #372.
Couldn't we cover a similar case in `test_second_level`?