Bug fix: onCreate called again by onActivityResult

See comments in the code change with this fix.