I do not know if this problem is solved, but I had the same I find a solution by myself.
I added in categories.php around line 73:
$site_template->register_vars(array(
"categories" => get_categories($cat_id),
"cat_name" => format_text($cat_cache[$cat_id]['cat_name'], 2),
[...]
"random_cat_image" => $random_cat_image
this at the end:
,"title" => $_GET[cat_id]
That's the trick. In my template I call {title} to get the cat-ID without being overwritten from random image.
I hope, there will be a solution in some next version of 4images so that you could use the catid without changing the code.
Phedo.