I'm not comfortable with changing unit_is_enabled() to use unit_file_get_list() instead of unit_file_get_state(). It will load massively more data over DBus for systemctl is-enabled, which ought to be a lightweight command after our changes. unit_file_get_list() will populate Hashmap h with thousands -- even tens of thousands -- of items.

Surely, unit_file_get_state() can leverage PID 1's enabled cache to be fast without changing systemctl.