pdf_store_page_resources releases page resources, but they may be used in next pages. Due to that such resources may be duplicated in the output file.
Patch http://www.ghostscript.com/pipermail/gs-cvs/2003-October/003659.html