Clone module base schema before extending.

Writing to the base module schema without cloning it first was causing the base schema to be overwritten and causing false negatives.