fix accept() for abstract methods
conditionally recurse into if-then-else in accept() (fixes #22)