Adjust metadata handling for blocks in config files. Implements #884, thanks to Techjar.