[[ Bug 12288 ]] Prevent rect width and height underflow