It look like the bug that was fixed with this pull request:
I've used the current state of this repository and the current state of the gazebo8 branch. Compiled both from sources on ubuntu xenial.
The pull request was merged in the gazebo8 branch at that time.
Do you know any workaround or parameter setting that would help? playing around with the resolution didn't help.
Cpu ray sensor works like a charm, but sadly can't measure animated actors..