Fixes logical error with QM/MM region extraction.
Merge branch 'hotfix-logical_error'