fixup lasthash calculation
Merge branch 'patches/separate-sessions-db' into MOODLE_26_STABLE-local