Fix for rmi throws error "no such id".

Closes #9056. Also closes #9170. Thanks @coolljt0725 for the start!
Includes integration-cli test, I am not necessarily in love with, but it is necessary evil. :smiling_imp: 
How do we ensure that `parent` is not nil before we call things on it?  It seems weird that we get an `IsNotExist` error but it returns a non-nil image.