Make BitBlt proof against out-of-bounds access