A mortgage which is recorded in an improper office or without due attestation or probate or which is so defectively recorded as not to give notice to a prudent inquirer shall not be held to be notice to subsequent bona fide purchasers. A mere formal mistake in the record shall not vitiate it.