Fix query syntax which broke a couple functions' debug info (foreport from 1.4)