Fixed context for repeat events.

Documented context argument and created test
(which exposed the repeat bug).