Fix loadBean to work for proxies and subclasses.

Use isAssignableFrom instead of isInstance and unwrap proxies.