Bug 17494: Prevent duplicate tokens from getting stored