I’ve successfully recreated this issue and posted a screenshot of it below. As you can see, when collapsed, it leaves visible rem that is above one with further hierarchical cascade.
Logging off seems to be solving this issue with collapsing.
As multi-level templates are concerned, there seems to be issue with more complex ones (in terms of hierarchy), since order of rems sometimes tends to mess up.