Make strict legality checking configurable in analyze.py. Original patch by JDB.