Issue with view.close() method

We experienced a strange/inconsistent behaviour with the view.close method in Datagrok. If the view.close method is called on a view without a saved layout the view simply gets closed without modifying the current active view. However if view.close is called on a view which has a saved layout (not necessarily saved to server) the current active view gets changed!

Is this intended behaviour and if so, why is this happening? Is there a way to prevent Grok doing this?

Hello, Andreas!
We are trying to reproduce the issue. Could you please clarify how exactly the active view gets changed?