Fix problems with incomplete attempt to prohibit OIDS with MVs.

Problem with assertion failure in restoring from pg_dump output
reported by Joachim Wieland.

Review and suggestions by Tom Lane and Robert Haas.