Just read through/skimmed this thread real quick. Wanted to point out a few things, if they were missed:
-Oiled filters, such as the K&N are famous for mucking up MAF sensors. Especially when they are over oiled, which is frequently done by over zealous first timers. Typically the MAF sensor is a heated wire, that the air flowing past cools down, so that more current/voltage must be added to keep the wire at the target temp. Add some oil mist/vapour, and you can bank on getting various MAF error codes.
-MAF mount/tube diameter must match the stock internal diameter EXACTLY. If the new intake has a larger tube, you can expect lean fueling related CEL/error codes. If the tube is smaller than stock, you can expect the opposite. The ECU calculates fueling with a bunch of inputs, but the single most important sensor input for fuel quantity calculation is the MAF sensor. The MAF sensor and tube that its mounted in are an engineered pair, meaning that the reading from the MAF is only accurate if it is paired with the stock diameter tube.
Hope that helps shed some light on this intake issue. If I end up with the 2007, 2GR powered RAV4, Ill probably end up building an intake for it. One that will use a dry filter, and the stock size MAF tube LOL.