Thrown out by Attachment Saving in Quality Inspection

For Purchase Receipts, I have added one custom field for a file attachment to the Quality Inspection DocType. It is made mandatory for certain Quality Inspection Templates.

When I attach a file using it, I am thrown back to the Purchase Receipt, leaving the Quality Inspection as saved but not submitted. I have to go back to the Quality Inspection again to complete the inspection and submit it.

Is this a bug, does anyone else experience this and know of a solution?