Added extra model check to prevent that a simple module is treated as model (ref #1097).