fixes #242: Query Error accessing Detail View after global search