Fix `Session.equals` and `Session.setDefault`

@pauldowman Can you review?