Fixed bug in semantic check for incomplete pattern definitions