I'm not sure if the /g implementation is related or not but I've found something weird:
//echo -a $regex(test1...ctest1...,/test1(.*?)(?:c)?/g) $regml(0) -- $regml(1) - $regml(2) - $regml(3) - $regml(4)
This correctly finds two matches ($regex returns 2), correctly finds there are two backreferences ($regml(0) is 2) but returns empty value for them. Tested on 7.34.