Check cycles before propagating events.
Merge pull request #141 from tsherif/event-cycles

Check cycles before propagating events. Closes #140.