diff --git a/src/QRegex/Cursor.nqp b/src/QRegex/Cursor.nqp index b4e70db24..04a515586 100644 --- a/src/QRegex/Cursor.nqp +++ b/src/QRegex/Cursor.nqp @@ -431,8 +431,10 @@ role NQPMatchRole is export { nqp::bindattr_i($new, $?CLASS, '$!from', $!from); nqp::bindattr_i($new, $?CLASS, '$!pos', $!pos); nqp::bindattr_i($new, $?CLASS, '$!to', -1); - nqp::bindattr($new, $?CLASS, '$!cstack', nqp::clone($!cstack)) if $!cstack; - nqp::bindattr($new, $?CLASS, '$!bstack', nqp::clone($!bstack)); + nqp::bindattr($new, $?CLASS, '$!cstack', $!cstack); + nqp::bindattr($new, $?CLASS, '$!bstack', $!bstack); + nqp::bindattr(self, $?CLASS, '$!bstack', nqp::null()); + nqp::bindattr(self, $?CLASS, '$!cstack', nqp::null()); $new } else {