Fix for queries which have multiple anonymous placeholder expansions.