fixed caching behavior in case neither <layer> nor <layers> are present in the config, closes #426