I miss here the check for the next element being END_ELEMENT. Then, the reader is not advanced properly which results in skipping the named caches configuration.