fixes #6375 - fix needed for Rails 3.2.8 only that ensures reference_id on parameter.rb matches the nested object id

why not applying the patch only on version that is affected? also I'd prefer checking this need before we run `ensure_reference_nil` rather than setting back the nested_obj.id