Fix gsub in generated models to look for and use model namespace