[CLEANUP] Simplify updating of timestamp in writeForeignField