Fixes nil regex entries in exec and match. Fixes #307