Improved query at unique slug index creation. refs: #331