[misc] Better implementation for the legacy configuration source.