Improving support for POW in arithmetic. Resolves bug 549.