Modified to avoid double Castle registration with MSTest