Bug#1955 - Avoid the bug condition in XSQL