Issue 1460 Added unit tests for fix

Added an additional unit test to handle the case where a sub-sub-spec
is dependant upon a parent. Also added a unit test for the case where
a sub-spec is dependant on a pod whose name closely matches one of it's
parents names.