Refactored BaseTypeForeignKey query lookup. Cross-type field lookup still does not work, but some code is in place in case a workaround is found.