Fixed detached HEAD

Added inheritance-related content.

Original (branchless) commit can be found at:
1da4cdda6a7b72bcd159ed3c43048ae404cf8eb3