It is definitely a bug and I will created appropriate github issue. Initally I was thinking about doing a wrap where I would close rectangle path, but it turned out that the problem is more complex and I'm afraid you'll wait a bit longer for possible workaround. I will let you know when the issue is created so you can follow and be notified about all related updates.