I'm guessing your $and should be a $or, or you might be getting tripped up by the spaces in your $if2 functions. In addition, your brackets are mismatched. Personally, I would have written it as:
This looks for a match on the "Various Artists" ID and the albumartist being "Various Artists" -- only triggering if both conditions are met. Checking for both conditions addresses the potential problem in cases where the albumartist is credited to something other than "Various Artists". That condition could also be addressed by checking the "Use standardized artist names" box under Options -> Metadata.
It also adds a default "Unknown" if all of the %compiler%, %djmixer% and %label% tags are empty.