Fix invalid memory read in CEPInferenceMethod class

Fix related to EP part of issue #1477