httpfoundation session invalidate bugfix to get around PHP bug