Add logic to prevent multiple calls to dispose

Prevents an exception from throwing when dispose is called more than
once on the consumer class.