Save priority for top-level node before switching to child events, fixes #243