The fate of Cd during the replacement of Cd-bearing calcite by calcium phosphate minerals.