Reinsert check for constructor/family mismatch.

It appears that the code to do this was accidentally deleted at some
point. It is now called again.

Fixes #1434.