Test checkpointing
# What does this PR do?

This fixes how weights are loading when resuming training from a checkpoint, in the instances some weights are tied with other (and thus not saved). It also adds a test in the common tests to make sure the mechanism used is not broken by mistake.

Fixes #11666