progress on #23. XSB mutex will no longer be kept locked after 1st badly formed event