Fixed a bug when finding the correct event handler. It would use to pick the first one of the type and matching code construct that is in the hierarchy of the event raising event. Now it first searches for the exact object the event was raised on, and if it wasn't able to find it, than it moves onto the parent elements