Fix: bad error code path when loading session

Fixes #810

Signed-off-by: David Goulet <dgoulet@efficios.com>