WIP: Re-enable bucket discard optimization #5921

Draft
pastk wants to merge 2 commits from pastk-drape-bucket-discard-optimization into master

2 commits