Fixed unmatched cases for compiling sample.  Updated image() type rule to disallow dangling imports.