Well, in this case its somethign different I believe.
Creating them dynamicly could change my theory, so why not use draw_quad with the bmap pointer and see if the bmap will stay or not?
If you do it like this:
PANEL* panel = pan_create("bmap = test.bmp", 1);
ptr_remove(panel);
You cant check for panel.bmap because the panel pointer is invalid after ptr_remove call.