fixed error info construction in function failure in lib/match.js