[[ Bug 10986 ]] Make sure we only select an object if 'before/after' is not specified.