Fix target association building

[#56005352]

targets.build did not set module_instance correctly because ActiveRecord
could not figure out the inverse between default_target and targets.