Implemented 14104d03 without exceptions and avoided checking the last tree

(related to issue #620)