Patch from PKP Bug #8623 (Statistics processing crashing for issue galleys)

http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=8623