Change the source_id in _insert_tile() to NULL
source_id as integer works for the building entities, tiles inserted from GHSL, but not for the tile inserted because of buildings. The value of tile entity in source_id field should allow integer or NULL.
Use insert tile function in Rabotnik rules, thus, make the _insert_tile() as public.
Edited by Chengzhi Rao