Bulk invoice payment assigning backwards?

@lubos Not related to the changes made here is it?