FELIX-5974 : Prototype scope references are not released on deactivation. Applied patch from Tim Ward