Workaround problem with named regex captures