Revert "Prevent unnecessary invalidation of the Docker build cache."

This reverts commit 71efd5b72242a37c6394fd4918e162129a3c0730.