This check used to be if 'files' not in u.metadata (well, expressed slightly differently). Did you forget the "not"?