Fix the "NO INHERIT" query

Report from Thomas Joseph.