layer: add tdm_layer_unset_buffer_internal