Do this workaround for FOSS packages as well

Also, I've decided not to try to remove the unused directories, because
that wasn't actually working