Fixes #9: Module exits model collection mode when any of the described conditions are met.