C: detect maybe::next::method

fixes issue 326.
Note that there is no maybe::next equivalent in 5.8, so we just use a NEXT::DISTINCT method