Fix #0d31e72 regression

https://github.com/rails-api/active_model_serializers/commit/0d31e72d2211b6bf7f0b0420139c4b370d6e986e
Merge pull request #611 from gauthier-delacroix/Fix-0d31e72

Fix #0d31e72 regression