fixed an issue with invalid nested enum references