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