Remove unnecessary intermediate map.