support copying EntityListeners annotation from template
(cherry picked from commit b558f9c)