I know exactly what you mean. I have had that smell come and go at times, can't say for sure if it's babys diet or my washing habits. BUT I think I have been avoiding it with this:
1) my usual washing plan involves a rinse with no soap, etc first- we have a HE washer and this makes sure everything is wet enough and gets the majority of the gross off before the real washing begins. Then in the wash I use soap, borax (controversial, I know), and a scoop of baking soda, and then vinegar in the fabric softener cup. The baking soda-vinegar thing usually does the trick.
2) every once in a while, if things seem stinky, I add non-chlorine bleach- which is like high strength hydrogen peroxide.
With this I have had much better luck. But I also think DD2 has less stinky pee than DD1.