main: cache parsing of configuration file

Parsing a small YAML file can already take 50ms.
bugfix: do not break when the index of an append_slice is 0