ZF-12422: Fix merging of identifiers for Zend_EventManager_EventManager (Backport from zf2)

Description

The same bug occurs in zf2 and has been fixed, it can be backported to zf1.

zf2 pull request https://github.com/zendframework/zf2/pull/1955

Comments

Fixed on trunk (25132) and release-1.12 (25133)