Fixed upper bound of wildcard matches.

Follow-on from 95b4348afa2ee335d9dc1f9e2fecf579b49f7ddf