Probing entanglement in a many-body–localized system