$+ matches what capturing parentheses matched. You have non-capturing parens. I presume, because it's part of an expression you're building, that you want to avoid capturing. But that's why it's not working.
Caution: Contents may have been coded under pressure.