Trimming Bug, working in 5 not working in 6

in version 5 when i put a polygon or any other closed curve, polyline exactly on the surface of a cube, go to front view select the polygon and use trim to trim a hole in to both parallel walls it works, in rhino 6 the 2nd trim deletes the entire object instead. it works when i move the curve polygon whatever away from the surface.

Untitled.3dm (2.7 MB)

hm, it seems i am mistaken, rhino 5 actually exhibits the same bug.