Improve pair member bug workaround: should now hopefully work with Intel; also improve code clarity. See bug #5307.