Thanks this was due to a bug in the PCRE library. I've updated to the latest version which seems to resolve the issue.