Fixed: When the compiler can't find a protocol in a class declaration

It now gives an understandable error.

This fixes #2212