Update kernel when renaming notebook

I am renaming a notebook via nbPanel.context.rename('foo.ipynb') and it works fine, however the kernel does not update to match the rename. For instance, if it launches on Untitled.ipynb, it will stay on that kernel.

This leads to an issue if multiples notebooks are renamed because they do not execute properly all being on the same kernel.

Is there a way to rename the file and have the kernel update?