A small ElementGallery edition context fix.
Merge pull request #608 from RotaruDan/smallElementGalleryRefactoring

A small ElementGallery edition context fix.