Made a general method for detecting variables which are accessible only by reference and not name.