Fix #111: Trim internal mappings instead of letting them grow endlessly