I just ran into this issue again and came across this topic. Looks like @sam added a fix to the plugin API which resolves this issue ![]()
https://github.com/discourse/discourse/commit/bd5fa1737d42a958bb5cda35ae5bab2464d4e084
So, to close this out: if you run into this issue, make sure you use add_to_serializer API rather than modifying the class yourself.