Fixes an exception when a has_one association is recursively restored.

The original implementation would raise a `method_missing` exception when a has_one association was recursively restored. The pull request first checks to see if the association is a collection before looping through the deleted items.