fix for fx-141: optimized extract_element

Replaced extract_element with 'iterator'-kind version.
Please, review and check that performance is at least not worse than it was before the change.