Muscle is more dense than fat. If you replace fat with an equal weight of muscle you'll look slimmer, even more so if you're adding muscle to your legs whilst 'losing' fat off your waist.
And, for similar reasons, you can still look/feel slimmer even if you're putting on weight slightly.
I'm 2kg heavier than I was 2 months ago but considerably fitter. Still 10kg over what I was before LEL last year though.