Bug 956938 - Fix active activity reference

and remove the activity window correctly when there is multiple inline activities