Set $wasPosted = true for recursive API access

Having an API module instantiate a new ApiMain rather than doing things
directly is usually the wrong thing to do. But if you're going to do it,
you'll need to set $wasPosted on your DerivativeRequest.

Bug: 70448
Change-Id: Ic48ce53f19b1d849c5b51e1f3a190638e246e8ec