Found the fix to the error I'd found, did some googling...
But firstly to explain + clarify the issued:
1. Problems only arose if one used the Surface method: surface_object.cloneSection on a surface containing transparency - on using this anything that ought to be transparent in the clone would not be.
2. The problems would get worse if surface_object.createImage() was used on the cloned section returned from the above - weird seemingly inexplicable distortions would occur.
The result of my googling was this:
https://www.allegro.cc/forums/thread/616777
Apparently it would have been an issue on Linux too; the issue is with the function Allegro uses to create a new bitmap, the data for the new bitmap on Windows is automatically cleared whereas on Unix based systems it isn't.
Working fix I've implemented in my build:
In the file vanilla.c in the function: js_Surface_cloneSection(duk_context* ctx) I added al_clear_to_color(al_map_rgba_f(0,0,0,0)); after the image is created. I've tested this with a couple of different test scripts and the error is now gone.
Full function with the addition:
static duk_ret_t
js_Surface_cloneSection(duk_context* ctx)
{
int height;
image_t* image;
image_t* new_image;
int width;
int x;
int y;
duk_push_this(ctx);
image = duk_require_class_obj(ctx, -1, "ssSurface");
x = duk_to_int(ctx, 0);
y = duk_to_int(ctx, 1);
width = duk_to_int(ctx, 2);
height = duk_to_int(ctx, 3);
if ((new_image = image_new(width, height)) == NULL)
duk_error_blame(ctx, -1, DUK_ERR_ERROR, "unable to create surface");
al_set_target_bitmap(image_bitmap(new_image));
al_clear_to_color(al_map_rgba_f(0,0,0,0));//the fix
al_draw_bitmap_region(image_bitmap(image), x, y, width, height, 0, 0, 0x0);
al_set_target_backbuffer(screen_display(g_screen));
duk_push_class_obj(ctx, "ssSurface", new_image);
return 1;
}