Fixes in fsm detect/extract for better detection of non-fsm circuits