We are able to reliably recreate the following scenario:
I had a similar problem today when using $.ajax and was able to fix it by setting async to false.
$.ajax({ async: false, url: '[post action url]', data: $form.serialize(), type: 'POST', success: successCallback });