Small patch to fix metadata expiration

Without this the `metadata_expire` option in the repository configuration is ignored.