[MERGE] detacth session if already attached

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