chore(engine/rest): adjust serialized variable handling

related to #CAM-2887