Fix a compiler error by including Flag.h
Fix a compiler warning by changing !foo(...) == 0 to foo(...) != 0
Merge branch 'tickets/DM-1302'
Be more consistent about exceptions thrown/caught in Schema::find

The Python-level code, which loops over all the C++ template instantiations until it
finds one that doesn't throw, was catching all Exceptions, not just those that meant
the field couldn't be found with the given type.
Perform Schema alias replacement recursively, and check for cycles.

Note that the implementation is not recursive (more efficient as a loop).