Fixed some bugs introduced by the destructive merge_mappings() et al operations. Rev: src/mapping.c:1.211