Don't set invalid block IDs, don't crash if an invalid block ID was set previously.

Signed-off-by: Ross Allan <rallanpcl@gmail.com>