Fixed incorrect matching of named elements beginning with same string