Fixed numerous issues related to unintended block to text marker conversion (mostly when dealing with ranged insertion).