Adds improved support for handling event reprocessing scenarios

See commits for more details.