Yes, "reopening" a slot like this is an error; this behavior was inherited from
CLIPS.
I can't think of any particularly elegant workarounds. You can name those
anonymous multifields and refer to them later in the rule, though -- i.e.,
(Temp (m $?first one two $?rest)
"?first" and "?rest"
Given
(deftemplate Temp (multislot m))
Cursory tests seem to indicate that a Temp pattern may be written with just
a single set of clusters consisting of '?', '$?' and their named cousins. As
an example, it's possible to write
(Temp (m $? one two $?))
but not
(Temp (m $? one two $?)(m $?mvals