Note: just pushing on master as this is not too critical as it's a fix for the old/legacy database attachment store.