[BUGFIX] Early return in checkValueForInternalReferences