Allow using keywords for ref names in patterns