MT#7747 Adapt tests to latest change.
MT#5879 Hide g elements in comments.

(cherry picked from commit 7388a2bdb7e70feaa4e63774c307e4f14069c4f1)