closed #4160: Out of range exception in EventDispatcher
closed #4160: Adds test case for issue 4160.
Merge pull request #5503 from dumganhar/iss4160-out-of-range

closed #4160: Out of range exception in EventDispatcher