Fix #0d31e72 regression

Fix for https://github.com/rails-api/active_model_serializers/commit/0d31e72d2211b6bf7f0b0420139c4b370d6e986e regression (see comments on initial commit).