@KoiwiGal - I do think it depends on what a person means when they say they want to gain muscle. If they are losing weight through diet alone they will certainly lose muscle mass. But a combination of diet and a variety of exercises should help to build muscle in anyone who is interested in losing fat and increasing fitness.
In fact, this is why exercise should always be integrated into a weight-loss attempt. Losing too much muscle can affect body systems like the heart.