WIP on the foreign_key gsub problem.