Fix SQL query for prefix searches

Missed a NULLS FIRST in the ORDER BY messing up the search result.
Pretty bad bug, pretty easy fix. I'm smart today - Ballmers Peak
sponsored by Chimay.

Fixes #320.