Make reference identification logging conditional on debug level 3
Merge remote-tracking branch 'zath/michael_z' into merge-z-and-m