MDL-38487 qtype match restore: problem with blank ids.

As it happens, this field is useless, and has been removed from the DB
in 2.5. Therefore, we only need a work-around for stable branches.