Fix ref on empty key restrictions. Closes #343