shlib.sh: refactor is_gfi_mirror testing