Reverted part of bitmap's earlier patch.