Revert "addition to last commit..."
This reverts commit a05d328fb5ea20837a707d67cf29c2fe8cd9af56.

map_replace() may be unsuited since the reference to data is lost which makes it impossible to free any associated resources.
This and the feeling that this function is not the most important use case for a map gives me enough reason to revert