fixed preserving internal memory on native mapping

When mapping previously internally managed memory to external native memory,
contens of the internal memory should be copied to the native buffer in any
case, even if the memory was not mapped natively before.