FIx issue #12380 with foreign_key issue for belongs_to association