Did you tested with the -dPrinted parameter I suggested in my previous reply?
You can easily verify if indeed the hidden layers are being erroneously rendered. From a command prompt, run (change the file paths to your system specifics):
"C:\Program Files (x86)\ImageMagick-7.0.5-Q16\magick.exe" convert "Path\To\The\PDF.pdf" "Path\Where\To\Put\The\Page\Renders\Image.png"
You can also check what image is being generated in the script, to quantify the ink utilization:
"C:\Program Files (x86)\ImageMagick-7.0.5-Q16\magick.exe" convert "Path\To\The\PDF.pdf" -colorspace gray -auto-level -threshold 99% "Path\Where\To\Put\The\Page\Renders\Image.png"