Revert "Tidy up enum matching where classname is missing"

This reverts commit 20e082d00e6390eeb1d2f4e00f6850127d9a1882.
Resolves #2935