Fixed #14300 -- Fixed initial SQL location if models is a package.

Thanks al_the_x for the report and fheinz for the draft patch.