Yeah, the tricky thing is that you're not going to gain a lot of muscle unless you're eating enough calories to support it. You may gain some if you're eating at a deficit and are under trained, but you're probably not going to see a lb a week of muscle gain while burning off more calories than you eat.
Your body is not overly fond of burning fat for the sole purpose of adding muscle. It likes to wait until you have some calories to spare - which is why you'll see weight lifters/body builders do a bulk cycle followed by a cut cycle, i.e. they'll eat lots of calories to gain muscle, and then cut way back on calories to burn off the fat that came along with their muscle gain.