[BUGFIX beta] Fix serialize *_id case. Closes #5594