Matches keeps an internal reference to spec object

Fixes #1729