#1008. Added logic to ensure that offer codes that cannot be used again
are not considered.