Only count known instructions as build steps

stepN is only used in the log line, so if we only produce the log line
when there's a message, it should do the right thing.

If it's *not* a valid instruction, it gets a line as well, so there's no
reason to double up.