Fix foreach error for storage models without stored columns