I want to say this is because of how I think degeneration search works
Since no one wants degeneration (at least there is no reason you would want a pet with it specifically to purchase, and mating to it with a non-relative would be just like a regular breeding) -- the search actually uses that number as a "maximum acceptable amount of degeneration" and not a whole valid search query by itself. So essentially the rest of your query is BLANK. Couple this with the fact that there is probably not any pets with degeneration up for sale means that the search is finding nothing, or is infinately looping trying to search for the rest of your query.
At least, this is what I'm thinking is probably happening. If that is what is happening, this isn't a bug so much as a intended consequence that needs to have an error message produced or the search query discarded.
What I can suggest for you to fix this bug is: don't do this anymore. If it is running an infinite loop (which is what the lag would suggest) seraching for your null query (which the rest of the search script is programmed to ignore) then it's probably taxing your connection to the server and possibly the server itself.
What else you can do is enter more of a search than just degeneration, such as breed, gender, genetics, etc. which will return a result -- though as I said, not neccessarily a pet with degeneration.