Thank you! This is much better. In cases where there is a table at the end of the body, it does now work as expected.
One thing that still does not work with this either is placing the caret before the table. So take this situation:
The caret is at the beginning of the first cell of a table. The user preses arrow-up or arrow-left to try to add some content within the body node before the table. Instead, the caret jumps into the keywords node. It looks like the user cannot add content into the body node before the table without deleting the table and then later re-adding it.