That could be easily avoided by statute.
If the safe were opened inappropriately,
the statue could mandate than any incriminating evidence was inadmissible in court
and the contents had to be returned.
Any first year Harvard law student could write that law as absolute boilerplate.
All we need are simple laws to avoid such nonsense,
but we have a totally inefficient and dysfunctional government
as created by our "magnificently perfect" Constitution.
The story says the FBI had a warrant to search the safe. Getting the codes from Liberty only means they didn't have to use destructive methods to get into the safe.