Hass.services.has_service('mqtt', 'publish') stuck in "False" state - how to debug?

Hi, I’ve got custom component which checks if MQTT is enabled on the host by means of the following command. It checks it at HA startup only once:

self._mqtt_enabled = hass.services.has_service(‘mqtt’, ‘publish’)

However, at some point this function started to return “False” despite the fact that mqtt publish works just fine in HA. Moreover, I’ve tripped the variable into “True” manually and that makes my custom component work as usual.

I’m on HA 0.110.4 that runs in Docker. I’ve tried to restart container but it doesn’t help.

I’ve enabled debug and could see messages that MQTT integration started successfully. All my automations that publish to MQTT also work just fine.

How to debug that and where from

hass.services.has_service(‘mqtt’, ‘publish’)

takes its value?