8.5.2: multiple Securimage captchas on page always fail on first try, then ok

Permalink
If I have multiple forms with captchas on the same page, the very first one always fails on the first try, then all work fine.

I suspect the Securimage code is stored from the last loaded captcha image, so any other form will fail because their codes were different. Or maybe it's something else.

Does anyone have any suggestions how to fix that? How can I assign the same code to all captcha images on the page?

Here's the code piece for form submission:
var ccm_captcha_img = $('.ccm-captcha-image');
$.ajax({
   ...
})
.done(function(response) {
    if (response['status'] === 'ok') {
        ...
        ccm_captcha_img.trigger('click');
    }
    else {
        ...
        var t = (new Date()).getTime();
        ccm_captcha_img.each(function(i, v) {
            $(v).attr('src', $(v).attr('src').replace(/([?&]nocache=)(\d+)/, '$1' + t));
        });

linuxoid