Section 275 of the Real Property Law requires that a Mortgagee discharge a mortgage of record within a certain time period, under the cloud of being monetarily penalized. Following is a link to the statute. It is an easy read:
It won't affect your "title", so to speak, but it will inevitably affect your ability to get a Certificate of Continuing Occupancy from the local municipality in form that will allow for you to close and thereby convey title to the house.
From the facts you presented, you should hope that your Contract has a liquidated damages clause which would limit your exposure to losing only the $5,000 downpayment, because based on your own facts, I would opine that you could be looking at much worse. Giving someone a personal loan and then purporting to no longer qualify for a mortgage will not work, rest assured, irrespective of the reason why you had given the loan.
Objectively speaking, if the real estate broker is a "seller's broker", then the broker is working for the seller, and his primary objective is to "make the deal" and not to best represent your interests. Therefore, since he or she only gets paid by the seller if he or she makes the deal, then it may be safe to assume that he or she will not direct you to an engineer who you would otherwise hope would espouse to you some "doom and gloom", as opposed to painting a sunny picture. So having said...