I am using these two script calls to place the default tileset archway door (B layer) on tile 5,5 and change the tile's region ID to 100:
Ritter.MapTransform.changeTile(5, 5, 3, 70, true);
Ritter.MapTransform.changeRegionId(5, 5, 100, true);
It works fine at first, but when I leave the map and come back the region ID seems to have reverted and the tile layer under the B layer archway door changed to ID 0, so it looks like a black square door (because the A layer underneath got deleted).
For the second picture:
Ritter.MapTransform.getTileId(5, 5, 0) returns 0 for the bottom layer
Ritter.MapTransform.getTileId(5, 5, 3) returns 70 (the arch door tile) for layer 3