Yeah, I agree about the confusion about the logout if session on the SP is expired but not in IdP.
Can you send your changes in a PR ? So I can test here and see what we can do.
Tks.