Merge pull request #864 from davidhorstmann-arm/2.16-fix-session-copy-bug

Backport 2.16: [session] fix a session copy bug