How to implement homomorphic multiplication for Elgamal?
If $(R_1,c_1)=(g^{r_1}, A^{r_1}m_1)$ and $(R_2,c_2)=(g^{r_2},A^{r_2}m_2)$ are ciphertexts (with respect to the same public key $A$) corresponding to two messages $m_1$ and $m_2$, then
$$(R_1R_2,c_1c_2)=(g^{r_1+r_2},A^{r_1+r_2}m_1m_2)$$
is an encryption of the message $m_1m_2$ (note that the calculations are performed in $\mathbb Z/p\mathbb Z$, that is, modulo $p$).

Assuming that mpi_mulm(r, x, y, m) denotes the computation $r=xy\bmod m$ (which quick inspection of the GnuPG source code seems to confirm), this implies that (a, b) should indeed decrypt to the product of the plaintexts corresponding to (data1_a, data1_b) and (data2_a, data2_b).

This, in turn, likely means your correctness checks are flawed. If you care to post some example data and/or code, I can take a further look at the problem.