rlm_sqlcounter causing a segmentation fault