No lien shall be defeated by taking a note, unless it was taken in discharge of the amount due and of the lien.